From 4014da87d573a246895a603f09884529a479ea15 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Tue, 27 Oct 2015 16:21:32 +0000 Subject: [PATCH] elf: Add relocation types to elfstructs.h GCC generates R_X86_64_64, R_X86_64_PC32, and R_X86_64_PLT32 relocations so those are the ones we need initially to support xSplice. Signed-off-by: Ross Lagerwall Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Andrew Cooper --- xen/include/xen/elfstructs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/include/xen/elfstructs.h b/xen/include/xen/elfstructs.h index 12ffb82a1a..85f35edc19 100644 --- a/xen/include/xen/elfstructs.h +++ b/xen/include/xen/elfstructs.h @@ -348,6 +348,12 @@ typedef struct { #define ELF64_R_TYPE(info) ((info) & 0xFFFFFFFF) #define ELF64_R_INFO(s,t) (((s) << 32) + (u_int32_t)(t)) +/* x86-64 relocation types. We list only the ones xSplice implements. */ +#define R_X86_64_NONE 0 /* No reloc */ +#define R_X86_64_64 1 /* Direct 64 bit */ +#define R_X86_64_PC32 2 /* PC relative 32 bit signed */ +#define R_X86_64_PLT32 4 /* 32 bit PLT address */ + /* Program Header */ typedef struct { Elf32_Word p_type; /* segment type */ -- 2.30.2